package com.wjw.cloud.common.constants;

/**
 * 错误码常量
 *
 * @author yujisun
 */
public enum CodeEnum
{
    REQUEST_PARAMETER_ERROR("1002", "请求参数错误"),
    ERROR_HTTP("1003", "HTTP请求出错"),
    LOGIN_ERROR("1004", "用户登录请求出错"),
    ORGAN_CODE_ERROR("1005", "医疗机构编码输入有误"),
    ORGAN_NAME_ERROR("1006", "服务机构名称输入有误"),
    USER_BIND_ERROR("1007", "用户绑定机构请求出错"),
    ORGAN_ALREADY_BIND_ERROR("1008", "该医疗机构已绑定"),
    WARN("9000", "失败"),
    SMS_INVALID("9990", "发送短信失败"),
    SMS_IS_EMPTY("9991", "短信验证码不能为空"),
    SMS_CODE_INVALID("9992", "短信验证码不正确"),
    GET_WECHAT_ACCESS_TOKEN_ERROR("9994","获取accessToken出现错误"),
    GET_WECHAT_BASE_ACCESS_TOKEN_ERROR("9995","获取BaseAccessToken出现错误"),
    WECHAT_TOKEN_ERROR("9996","微信token过期,重新获取"),
    WECHAT_HTTP_ERROR("9997","请求微信接口获取用户信息出错"),
    UNKNOWN_ERROR("9998","未知异常"),
    SYSTEM_ERROR("9999", "系统异常");
    private String code;
    private String message;

    private CodeEnum(String code, String message)
    {
        this.code = code;
        this.message = message;
    }

    public String getActionCode()
    {
        return code;
    }

    public String getMessage()
    {
        return message;
    }
}
